<html>
<head>
<title>addFPulseActivity</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" src="../../_sharedassets/pages.js"></script>
</head>
<body>
<table class="nav" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td width="100%" align="left"></td><td><a href="FStEngOneFive_29.html"><img src="../../_sharedassets/previous.gif" alt="Previous"></a><img src="../../_sharedassets/shim.gif" width="10"  height="1"><a href="FStEngOneFive_31.html"><img src="../../_sharedassets/next.gif" alt="Next"></a></td></tr><tr><td colspan="2"><img src="../../_sharedassets/shim.gif" height="4" width="1"></td></tr><tr><td colspan="2"><img src="../../_sharedassets/pixel.gif" height="1" width="100%"></td></tr><tr><td colspan="2"><img src="../../_sharedassets/shim.gif" height="11" width="1"></td></tr></table>
<h1>addFPulseActivity</h1>
<h4>Usage</h4>
<pre>
<i>myhStateC.addFPulseActivity(id, intvl, fnOrMet, obj)</i>
</pre>
<h4>Parameters</h4>
<p><i>id</i> ID of the activity (must be unique among activities on this state)</p>
<p><i>intvl</i> Interval, in frames, between calls</p>
<p><i>fnOrMet</i> Function object, or method name (string) to invoke</p>
<p><i>obj</i> If fnOrMet is the method name, this is the object on which the method resides</p>
<h4>Returns</h4>
<p>Nothing</p>
<h4>Description</h4>
<p>Use this method to add an activity to the state that fires every x frames. You can specify a function or method to call. Note: if you need to refer to the timeline from within a function, use the last example to call your function.</p>
<h4>Example</h4>
<pre>
&nbsp;&nbsp;//<ci> For a function: myFunc&nbsp;&nbsp;myState.addFPulseActivity(0, 20, myFunc);&nbsp;&nbsp;// For a method: myObj.myMethod&nbsp;&nbsp;myState.addFPulseActivity(0, 20, "myMethod", myObj);&nbsp;&nbsp;// For a function needing access to the timeline:&nbsp;&nbsp;myState.addFPulseActivity(0, 20, "myFunc", this); // when 'this' is the timeline</ci>
</pre>
<table class="nav" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><img src="../../_sharedassets/shim.gif" height="6" width="1"></td></tr><tr><td colspan="2"><img src="../../_sharedassets/pixel.gif" height="1" width="100%"></td></tr><tr><td colspan="2"><img src="../../_sharedassets/shim.gif" height="4" width="1"></td></tr><tr><td width="100%" align="left"></td><td><a href="FStEngOneFive_29.html"><img src="../../_sharedassets/previous.gif" alt="Previous"></a><img src="../../_sharedassets/shim.gif" width="10" height="1"><a href="FStEngOneFive_31.html"><img src="../../_sharedassets/next.gif" alt="Next"></a></td></tr></table>
</body>
</html>